<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Cheetah Software: Utilities_print.h Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Cheetah Software
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>File&#160;List</span></a></li>
      <li><a href="../../globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d3/d68/_utilities__print_8h_source.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Utilities_print.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="../../d3/d68/_utilities__print_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef PRINT_OUT_H</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define PRINT_OUT_H</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;stdarg.h&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../d9/d8e/cpp_types_8h.html">cppTypes.h</a>&quot;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * print out</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * */</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="../../d3/d68/_utilities__print_8h.html#ad9d3e718964122f6b8078d07d981568f">   14</a></span>&#160;std::string <a class="code" href="../../d3/d68/_utilities__print_8h.html#ad9d3e718964122f6b8078d07d981568f">pretty_string</a>(T vv) {</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;  <span class="keyword">static</span> <span class="keywordtype">int</span> <span class="keyword">const</span> buflen(32);</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;  <span class="keyword">static</span> <span class="keywordtype">char</span> buf[buflen];</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;  memset(buf, 0, <span class="keyword">sizeof</span>(buf));</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;  snprintf(buf, buflen - 1, <span class="stringliteral">&quot;% 6.6f  &quot;</span>, vv);</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;  std::string str(buf);</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;  <span class="keywordflow">return</span> str;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;}</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">   24</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a>(<a class="code" href="../../d9/d8e/cpp_types_8h.html#a807200f3771dbd2cb2e4be52c5f2518c">DMat&lt;T&gt;</a> <span class="keyword">const</span> &amp;mm, std::ostream &amp;os, std::string <span class="keyword">const</span> &amp;title,</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;                  std::string <span class="keyword">const</span> &amp;prefix = <span class="stringliteral">&quot;&quot;</span>, <span class="keywordtype">bool</span> vecmode = <span class="keyword">false</span>,</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;                  <span class="keywordtype">bool</span> nonl = <span class="keyword">false</span>) {</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;  <span class="keywordtype">char</span> <span class="keyword">const</span> *nlornot(<span class="stringliteral">&quot;\n&quot;</span>);</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;  <span class="keywordflow">if</span> (nonl) {</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    nlornot = <span class="stringliteral">&quot;&quot;</span>;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;  }</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;  <span class="keywordflow">if</span> (!title.empty()) {</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    os &lt;&lt; title &lt;&lt; nlornot;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;  }</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;  <span class="keywordflow">if</span> ((mm.rows() &lt;= 0) || (mm.cols() &lt;= 0)) {</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    os &lt;&lt; prefix &lt;&lt; <span class="stringliteral">&quot; (empty)&quot;</span> &lt;&lt; nlornot;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <span class="keywordflow">if</span> (vecmode) {</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;      <span class="keywordflow">if</span> (!prefix.empty()) os &lt;&lt; prefix;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> ir(0); ir &lt; mm.rows(); ++ir) {</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        os &lt;&lt; <a class="code" href="../../d3/d68/_utilities__print_8h.html#ad9d3e718964122f6b8078d07d981568f">pretty_string</a>(mm.coeff(ir, 0));</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;      }</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;      os &lt;&lt; nlornot;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> ir(0); ir &lt; mm.rows(); ++ir) {</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <span class="keywordflow">if</span> (!prefix.empty()) os &lt;&lt; prefix;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> ic(0); ic &lt; mm.cols(); ++ic) {</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;          os &lt;&lt; <a class="code" href="../../d3/d68/_utilities__print_8h.html#ad9d3e718964122f6b8078d07d981568f">pretty_string</a>(mm.coeff(ir, ic));</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        }</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        os &lt;&lt; nlornot;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;      }</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    }</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;  }</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;}</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="../../d3/d68/_utilities__print_8h.html#a400cd6dcfd22772f0bd816baa42171eb">   57</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a>(<a class="code" href="../../d9/d8e/cpp_types_8h.html#a8686862774f7c3186c7920447f4de282">Quat&lt;T&gt;</a> <span class="keyword">const</span> &amp;vv, std::ostream &amp;os, std::string <span class="keyword">const</span> &amp;title,</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;                  std::string <span class="keyword">const</span> &amp;prefix = <span class="stringliteral">&quot;&quot;</span>, <span class="keywordtype">bool</span> nonl = <span class="keyword">false</span>) {</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;  <a class="code" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a>((<a class="code" href="../../d9/d8e/cpp_types_8h.html#a807200f3771dbd2cb2e4be52c5f2518c">DMat&lt;T&gt;</a> <span class="keyword">const</span> &amp;)vv, os, title, prefix, <span class="keyword">true</span>, nonl);</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;}</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="../../d3/d68/_utilities__print_8h.html#ac2d4fac8fe36a0f7d9b81dd8cb531c6d">   63</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a>(<a class="code" href="../../d9/d8e/cpp_types_8h.html#ae2e5a0a178a2c528d8aa939f85db7a3e">DVec&lt;T&gt;</a> <span class="keyword">const</span> &amp;vv, std::ostream &amp;os, std::string <span class="keyword">const</span> &amp;title,</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;                  std::string <span class="keyword">const</span> &amp;prefix = <span class="stringliteral">&quot;&quot;</span>, <span class="keywordtype">bool</span> nonl = <span class="keyword">false</span>) {</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;  <a class="code" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a>((<a class="code" href="../../d9/d8e/cpp_types_8h.html#a807200f3771dbd2cb2e4be52c5f2518c">DMat&lt;T&gt;</a> <span class="keyword">const</span> &amp;)vv, os, title, prefix, <span class="keyword">true</span>, nonl);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;}</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="../../d3/d68/_utilities__print_8h.html#aea0263ff2f496c2adea5fdb5b16f7f1f">   69</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a>(<a class="code" href="../../d9/d8e/cpp_types_8h.html#a190e396ab8cb0eb974ad2a5195edcb24">D3Mat&lt;T&gt;</a> <span class="keyword">const</span> &amp;vv, std::ostream &amp;os,</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;                  std::string <span class="keyword">const</span> &amp;title, std::string <span class="keyword">const</span> &amp;prefix = <span class="stringliteral">&quot;&quot;</span>,</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;                  <span class="keywordtype">bool</span> nonl = <span class="keyword">false</span>) {</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;  <a class="code" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a>((<a class="code" href="../../d9/d8e/cpp_types_8h.html#a807200f3771dbd2cb2e4be52c5f2518c">DMat&lt;T&gt;</a> <span class="keyword">const</span> &amp;)vv, os, title, prefix, <span class="keyword">false</span>, nonl);</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;}</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="../../d3/d68/_utilities__print_8h.html#ab7659cf74d8832300c0adf57561af849">   76</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a>(<a class="code" href="../../d9/d8e/cpp_types_8h.html#aa8cb424e643d476ea485238dad7c3e18">Mat3&lt;T&gt;</a> <span class="keyword">const</span> &amp;vv, std::ostream &amp;os, std::string <span class="keyword">const</span> &amp;title,</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;                  std::string <span class="keyword">const</span> &amp;prefix = <span class="stringliteral">&quot;&quot;</span>, <span class="keywordtype">bool</span> nonl = <span class="keyword">false</span>) {</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;  <a class="code" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a>((<a class="code" href="../../d9/d8e/cpp_types_8h.html#a807200f3771dbd2cb2e4be52c5f2518c">DMat&lt;T&gt;</a> <span class="keyword">const</span> &amp;)vv, os, title, prefix, <span class="keyword">false</span>, nonl);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;}</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="../../d3/d68/_utilities__print_8h.html#a17f23e0662a40126536c978cf05411a8">   82</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a>(<a class="code" href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6&lt;T&gt;</a> <span class="keyword">const</span> &amp;vv, std::ostream &amp;os, std::string <span class="keyword">const</span> &amp;title,</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;                  std::string <span class="keyword">const</span> &amp;prefix = <span class="stringliteral">&quot;&quot;</span>, <span class="keywordtype">bool</span> nonl = <span class="keyword">false</span>) {</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  <a class="code" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a>((<a class="code" href="../../d9/d8e/cpp_types_8h.html#a807200f3771dbd2cb2e4be52c5f2518c">DMat&lt;T&gt;</a> <span class="keyword">const</span> &amp;)vv, os, title, prefix, <span class="keyword">false</span>, nonl);</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;}</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="../../d3/d68/_utilities__print_8h.html#a30fed5fd8a4009680d5be2586bfdce44">   88</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a>(<a class="code" href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec&lt;T&gt;</a> <span class="keyword">const</span> &amp;vv, std::ostream &amp;os, std::string <span class="keyword">const</span> &amp;title,</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;                  std::string <span class="keyword">const</span> &amp;prefix = <span class="stringliteral">&quot;&quot;</span>, <span class="keywordtype">bool</span> nonl = <span class="keyword">false</span>) {</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;  <a class="code" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a>((<a class="code" href="../../d9/d8e/cpp_types_8h.html#a807200f3771dbd2cb2e4be52c5f2518c">DMat&lt;T&gt;</a> <span class="keyword">const</span> &amp;)vv, os, title, prefix, <span class="keyword">true</span>, nonl);</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;}</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="../../d3/d68/_utilities__print_8h.html#ab358bcd6c0f57e41c645b49fc61fdef9">   94</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a>(<a class="code" href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3&lt;T&gt;</a> <span class="keyword">const</span> &amp;vv, std::ostream &amp;os, std::string <span class="keyword">const</span> &amp;title,</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;                  std::string <span class="keyword">const</span> &amp;prefix = <span class="stringliteral">&quot;&quot;</span>, <span class="keywordtype">bool</span> nonl = <span class="keyword">false</span>) {</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;  <a class="code" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a>((<a class="code" href="../../d9/d8e/cpp_types_8h.html#a807200f3771dbd2cb2e4be52c5f2518c">DMat&lt;T&gt;</a> <span class="keyword">const</span> &amp;)vv, os, title, prefix, <span class="keyword">true</span>, nonl);</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;}</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="../../d3/d68/_utilities__print_8h.html#a13d1e37eae27196a38bb342a28235e62">  100</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a>(<a class="code" href="../../d9/d8e/cpp_types_8h.html#a3ed2d7a1fdebc191497c0cc0ab0a870b">Vec2&lt;T&gt;</a> <span class="keyword">const</span> &amp;vv, std::ostream &amp;os, std::string <span class="keyword">const</span> &amp;title,</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;                  std::string <span class="keyword">const</span> &amp;prefix = <span class="stringliteral">&quot;&quot;</span>, <span class="keywordtype">bool</span> nonl = <span class="keyword">false</span>) {</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;  <a class="code" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a>((<a class="code" href="../../d9/d8e/cpp_types_8h.html#a807200f3771dbd2cb2e4be52c5f2518c">DMat&lt;T&gt;</a> <span class="keyword">const</span> &amp;)vv, os, title, prefix, <span class="keyword">true</span>, nonl);</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;}</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="../../d3/d68/_utilities__print_8h.html#a62bb067273619f1b77e81ec1e9af544a">  106</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a>(<span class="keyword">const</span> std::vector&lt;T&gt; &amp;_vec, <span class="keyword">const</span> <span class="keywordtype">char</span> *title) {</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;  printf(<span class="stringliteral">&quot;%s: &quot;</span>, title);</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i(0); i &lt; _vec.size(); ++i) {</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    printf(<span class="stringliteral">&quot;% 6.4f, \t&quot;</span>, _vec[i]);</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;  }</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;  printf(<span class="stringliteral">&quot;\n&quot;</span>);</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;}</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="../../d3/d68/_utilities__print_8h.html#a7e1bb1fb2b83a882106122a4887d2f78">  115</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a>(<span class="keyword">const</span> T *_vec, <span class="keyword">const</span> <span class="keywordtype">char</span> *title, <span class="keywordtype">size_t</span> size) {</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;  printf(<span class="stringliteral">&quot;%s: &quot;</span>, title);</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i(0); i &lt; size; ++i) {</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    printf(<span class="stringliteral">&quot;% 6.4f, \t&quot;</span>, _vec[i]);</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;  }</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;  printf(<span class="stringliteral">&quot;\n&quot;</span>);</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;}</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;</div><div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835">  123</a></span>&#160;<span class="keyword">enum class</span> <a class="code" href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835">PrintColor</a> { <a class="code" href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835a7a1920d61156abc05a60135aefe8bc67">Default</a>, <a class="code" href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835aee38e4d5dd68c4e440825018d549cb47">Red</a>, <a class="code" href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835ad382816a3cbeed082c9e216e7392eed1">Green</a>, <a class="code" href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835a51e6cd92b6c45f9affdc158ecca2b8b8">Yellow</a>, <a class="code" href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835a9594eec95be70e7b1710f730fdda33d9">Blue</a>, <a class="code" href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835ab91cc2c1416fcca942b61c7ac5b1a9ac">Magenta</a>, <a class="code" href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835a023c239d2f2538f140a20e72c7b73f20">Cyan</a> };</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d3/d68/_utilities__print_8h.html#a2b2d015520d3b5e1562e8d70609a2b63">printf_color</a>(<a class="code" href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835">PrintColor</a> color, <span class="keyword">const</span> <span class="keywordtype">char</span> *fmt, ...);</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d3/d68/_utilities__print_8h.html#ad7bc2708d6f29fc64b4b961eac94c2da">fprintf_color</a>(<a class="code" href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835">PrintColor</a> color, FILE* stream, <span class="keyword">const</span> <span class="keywordtype">char</span> *fmt, ...);</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="cpp_types_8h_html_ae8ab6bd4079a5317297be5eeb331b1ca"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#ae8ab6bd4079a5317297be5eeb331b1ca">Mat6</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 6, 6 &gt; Mat6</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00070">cppTypes.h:70</a></div></div>
<div class="ttc" id="cpp_types_8h_html_aa8cb424e643d476ea485238dad7c3e18"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#aa8cb424e643d476ea485238dad7c3e18">Mat3</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 3 &gt; Mat3</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00054">cppTypes.h:54</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a807200f3771dbd2cb2e4be52c5f2518c"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a807200f3771dbd2cb2e4be52c5f2518c">DMat</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, Eigen::Dynamic, Eigen::Dynamic &gt; DMat</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00106">cppTypes.h:106</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a8686862774f7c3186c7920447f4de282"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a8686862774f7c3186c7920447f4de282">Quat</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 4, 1 &gt; Quat</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00058">cppTypes.h:58</a></div></div>
<div class="ttc" id="_utilities__print_8h_html_a77255dc095356f8499023fbd092cd835a023c239d2f2538f140a20e72c7b73f20"><div class="ttname"><a href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835a023c239d2f2538f140a20e72c7b73f20">PrintColor::Cyan</a></div></div>
<div class="ttc" id="_utilities__print_8h_html_ad7bc2708d6f29fc64b4b961eac94c2da"><div class="ttname"><a href="../../d3/d68/_utilities__print_8h.html#ad7bc2708d6f29fc64b4b961eac94c2da">fprintf_color</a></div><div class="ttdeci">void fprintf_color(PrintColor color, FILE *stream, const char *fmt,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/df9/_utilities__print_8cpp_source.html#l00013">Utilities_print.cpp:13</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a6f07728c866b15ff0676a9b2ebfd2ba6"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a6f07728c866b15ff0676a9b2ebfd2ba6">Vec3</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, 1 &gt; Vec3</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00026">cppTypes.h:26</a></div></div>
<div class="ttc" id="cpp_types_8h_html"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html">cppTypes.h</a></div></div>
<div class="ttc" id="_utilities__print_8h_html_a77255dc095356f8499023fbd092cd835ad382816a3cbeed082c9e216e7392eed1"><div class="ttname"><a href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835ad382816a3cbeed082c9e216e7392eed1">PrintColor::Green</a></div></div>
<div class="ttc" id="_utilities__print_8h_html_a77255dc095356f8499023fbd092cd835aee38e4d5dd68c4e440825018d549cb47"><div class="ttname"><a href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835aee38e4d5dd68c4e440825018d549cb47">PrintColor::Red</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a190e396ab8cb0eb974ad2a5195edcb24"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a190e396ab8cb0eb974ad2a5195edcb24">D3Mat</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 3, Eigen::Dynamic &gt; D3Mat</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00114">cppTypes.h:114</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a3d70f8eb9cf1855ca989f887a5543acc"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a3d70f8eb9cf1855ca989f887a5543acc">SVec</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 6, 1 &gt; SVec</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00062">cppTypes.h:62</a></div></div>
<div class="ttc" id="_utilities__print_8h_html_a77255dc095356f8499023fbd092cd835a9594eec95be70e7b1710f730fdda33d9"><div class="ttname"><a href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835a9594eec95be70e7b1710f730fdda33d9">PrintColor::Blue</a></div></div>
<div class="ttc" id="_utilities__print_8h_html_a0d5ac61bf2b7611715c750cf271b33e9"><div class="ttname"><a href="../../d3/d68/_utilities__print_8h.html#a0d5ac61bf2b7611715c750cf271b33e9">pretty_print</a></div><div class="ttdeci">void pretty_print(DMat&lt; T &gt; const &amp;mm, std::ostream &amp;os, std::string const &amp;title, std::string const &amp;prefix=&quot;&quot;, bool vecmode=false, bool nonl=false)</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d68/_utilities__print_8h_source.html#l00024">Utilities_print.h:24</a></div></div>
<div class="ttc" id="cpp_types_8h_html_a3ed2d7a1fdebc191497c0cc0ab0a870b"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#a3ed2d7a1fdebc191497c0cc0ab0a870b">Vec2</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, 2, 1 &gt; Vec2</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00022">cppTypes.h:22</a></div></div>
<div class="ttc" id="_utilities__print_8h_html_ad9d3e718964122f6b8078d07d981568f"><div class="ttname"><a href="../../d3/d68/_utilities__print_8h.html#ad9d3e718964122f6b8078d07d981568f">pretty_string</a></div><div class="ttdeci">std::string pretty_string(T vv)</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d68/_utilities__print_8h_source.html#l00014">Utilities_print.h:14</a></div></div>
<div class="ttc" id="_utilities__print_8h_html_a77255dc095356f8499023fbd092cd835a7a1920d61156abc05a60135aefe8bc67"><div class="ttname"><a href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835a7a1920d61156abc05a60135aefe8bc67">PrintColor::Default</a></div></div>
<div class="ttc" id="_utilities__print_8h_html_a77255dc095356f8499023fbd092cd835ab91cc2c1416fcca942b61c7ac5b1a9ac"><div class="ttname"><a href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835ab91cc2c1416fcca942b61c7ac5b1a9ac">PrintColor::Magenta</a></div></div>
<div class="ttc" id="_utilities__print_8h_html_a77255dc095356f8499023fbd092cd835a51e6cd92b6c45f9affdc158ecca2b8b8"><div class="ttname"><a href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835a51e6cd92b6c45f9affdc158ecca2b8b8">PrintColor::Yellow</a></div></div>
<div class="ttc" id="_utilities__print_8h_html_a2b2d015520d3b5e1562e8d70609a2b63"><div class="ttname"><a href="../../d3/d68/_utilities__print_8h.html#a2b2d015520d3b5e1562e8d70609a2b63">printf_color</a></div><div class="ttdeci">void printf_color(PrintColor color, const char *fmt,...)</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/df9/_utilities__print_8cpp_source.html#l00003">Utilities_print.cpp:3</a></div></div>
<div class="ttc" id="cpp_types_8h_html_ae2e5a0a178a2c528d8aa939f85db7a3e"><div class="ttname"><a href="../../d9/d8e/cpp_types_8h.html#ae2e5a0a178a2c528d8aa939f85db7a3e">DVec</a></div><div class="ttdeci">typename Eigen::Matrix&lt; T, Eigen::Dynamic, 1 &gt; DVec</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/d8e/cpp_types_8h_source.html#l00102">cppTypes.h:102</a></div></div>
<div class="ttc" id="_utilities__print_8h_html_a77255dc095356f8499023fbd092cd835"><div class="ttname"><a href="../../d3/d68/_utilities__print_8h.html#a77255dc095356f8499023fbd092cd835">PrintColor</a></div><div class="ttdeci">PrintColor</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d68/_utilities__print_8h_source.html#l00123">Utilities_print.h:123</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_43e0a1f539e00dcfa1a6bc4d4fee4fc2.html">home</a></li><li class="navelem"><a class="el" href="../../dir_61bfb0b3cdda81b1b0355ba34eb3b1eb.html">dhkim</a></li><li class="navelem"><a class="el" href="../../dir_adee5b101e079090017bb4e91c628ead.html">Public_Repository</a></li><li class="navelem"><a class="el" href="../../dir_7fc07a7b97001e7b1d18e11da761e2de.html">Cheetah-Software</a></li><li class="navelem"><a class="el" href="../../dir_860379c26524a894b3cf97b5b1ba5bdb.html">common</a></li><li class="navelem"><a class="el" href="../../dir_275ce76ae8a9e2090fbb7142d3994a0e.html">include</a></li><li class="navelem"><a class="el" href="../../dir_d631aa3083290dc23dd8bdcd7ad213ec.html">Utilities</a></li><li class="navelem"><a class="el" href="../../d3/d68/_utilities__print_8h.html">Utilities_print.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
